import request from '@/utils/request'

export function getStandardLib(data) {
    return request({
        url: '/standardlibs',
        method: 'get',
        params: data
    })
}

export function getStandardLibNameVersion() {
    return request({
        url: '/standardlibs/nameversioninfo',
        method: 'get',
    })
}

export function getConfigureItem(data) {
    return request({
        url: '/configs',
        method: 'get',
        params: data
    })
}

export function getOneConfigure({id, ...data}) {
    return request({
        url: `/configs/${id}`,
        method: 'get',
        params: data
    })
}

export function deleteConfigureItem(data) {
    return request({
        url: '/configs',
        method: 'delete',
        data
    })
}

export function getClassInfo() {
    return request({
        url: '/configs/classinfo',
        method: 'get',
    })
}

export function createConfigureItem(data) {
    return request({
        url: '/configs',
        method: 'post',
        data
    })
}

export function updateConfigureItem(data) {
    return request({
        url: '/configs',
        method: 'put',
        data
    })
}

export function getConfigureNames(data) {
    return request({
        url: '/configs/configName',
        method: 'get',
        params: data
    })
}